<?php
/**
 * common model file Created by PhpStorm.
 * User: wumengmeng
 * Date: 2019/10/16
 * Time: 17:34
 */

namespace HiCommon\Model;

class DiscoverZan extends Base
{
    
    protected $table = 'discover_zan';
    
    protected $guarded = [];
    
    //public $timestamps = false;
    
    /**
     * 应该被调整为日期的属性
     *
     * @var array
     */
    protected $dates = [
    ];
    


    //管理前段用户表
    public function to_user()
    {
        return $this->belongsTo(Users::class, 'user_id')->select('id','nickname');
    }

    //关联朋友圈表
    public function discover()
    {
        return $this->belongsTo(Discover::class, 'link_id');
    }


    //关联评论表
    public function discover_apprise()
    {
        return $this->belongsTo(DiscoverApprise::class, 'link_id');
    }





    
  
}